<include file="./Application/Admin/View/_meta.html" />
<include file="./Application/Admin/View/_header.html" />
<include file="./Application/Admin/View/_menu.html" />
<script type="text/javascript" src="__GLOBAL__/js/jquery.min.js"></script>

<article class="cl pd-20">
    <form action="__SELF__" method="post" class="form form-horizontal" id="form-admin-add">
        <div class="row cl">
            <label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>项目组用户名：</label>
            <div class="formControls col-xs-8 col-sm-9">
                <input type="text" class="input-text" name="sername" id="sername" value="" placeholder="MarkMa" >
            </div>
        </div>
        <div class="row cl">
            <label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>商户号：</label>
            <div class="formControls col-xs-8 col-sm-9">
                <input type="text" maxlength="5" name="mch_id" class="input-text"  style="background-color:#cccccc" readonly value="{$mch_id}" placeholder="">
            </div>
        </div>
        <div class="row cl">
            <label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>商户密钥：</label>
            <div class="formControls col-xs-8 col-sm-9">
                <input type="text" maxlength="32" name="mch_key" value="{$mch_key}" style="background-color:#cccccc" readonly class="input-text" autocomplete="off">
            </div>
        </div>
        <div class="row cl">
            <label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>手机：</label>
            <div class="formControls col-xs-8 col-sm-9">
                <input type="text" class="input-text" maxlength="11" value="" placeholder="发现异常时短信通知"  id="phone" name="phone">
            </div>
        </div>
        <div class="row cl">
            <label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>备注：</label>
            <div class="formControls col-xs-8 col-sm-9">
                <textarea id="beizhu" name="beizhu" cols="" rows="" class="textarea"  placeholder="文新-某某夺宝" dragonfly="true"></textarea>
                <p class="textarea-numberbar"><em class="textarea-length">0</em>/100</p>
            </div>
        </div>
        <div class="row cl">
            <div class="col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-3">
                <input class="btn btn-primary radius" id="Submit" type="button" value="&nbsp;&nbsp;提交&nbsp;&nbsp;">
            </div>
        </div>
    </form>
</article>

<script type="text/javascript">
    $('#Submit').bind('click',function () {
        var username = $("#sername").val();
        var reg = /^[a-zA-Z]+$/;
        if(!reg.test(username)  && username.length < 8){
            $("#sername")[0].focus();
            layer.alert('必须为英文并且不能超过八位');
            return false;
        }

        if($("#beizhu").val() == ''){
            $("#beizhu")[0].focus();
            layer.alert('请填写项目备注');
            return false;
        }

        if($("#beizhu")[0].value.length < 5){
            $("#beizhu")[0].focus();
            layer.alert('备注内容太少');
        }

        $("#form-admin-add").submit();
    });
</script>

<!--_footer 作为公共模版分离出去-->
<include file="./Application/Admin/View/_footer.html" />

</body>
</html>